home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / halt.lzh / halt / ups.h < prev   
C/C++ Source or Header  |  1995-10-06  |  1KB  |  51 lines

  1. /*
  2.    ups.h --- UpsInfo definitions for halt.library
  3.  
  4.    (c) Copyright 1995 SHW Wabnitz
  5.    Written by Bernhard Fastenrath (fasten@shw.com)
  6.  
  7.    This file may be distributed under the terms
  8.    of the GNU General Public License.
  9. */
  10.  
  11. #ifndef UPS_H
  12. #define UPS_H
  13.  
  14. #define UPS_EV_NAMES { \
  15.   "Okay", "Line Fail", "Recovery", \
  16.   "Bypass", "No Bypass", "Low Battery", \
  17.   "Recharged", "Shutdown Recommended", \
  18.   "Short Power Fail", "", \
  19.   "Fault",      "No Fault", \
  20.   "Inverter",   "No Inverter", \
  21.   "Special On", "Special Off", "", \
  22.   "Connection Lost", "Connection Restored" \
  23. }
  24.  
  25. #define UPS_EV_OKAY         0x00
  26. #define UPS_EV_LINE_FAIL    0x01
  27. #define UPS_EV_RECOVERY     0x02
  28. #define UPS_EV_BYPASS       0x03
  29. #define UPS_EV_NO_BYPASS    0x04
  30. #define UPS_EV_LOW_BATTERY  0x05
  31. #define UPS_EV_RECHARGED    0x06
  32. #define UPS_EV_SHUTDOWN_RECOMMENDED 0x07
  33. #define UPS_EV_SHORT_POWER_FAIL     0x08
  34. #define UPS_EV_FAULT        0x0a
  35. #define UPS_EV_NO_FAULT     0x0b
  36. #define UPS_EV_INVERTER     0x0c
  37. #define UPS_EV_NO_INVERTER  0x0d
  38. #define UPS_EV_SPECIAL_ON   0x0e
  39. #define UPS_EV_SPECIAL_OFF  0x0f
  40. #define UPS_EV_CONNECTION_LOST 0x11
  41. #define UPS_EV_CONNECTION_OKAY 0x12
  42. #define UPS_EV_MAX 0x12
  43.  
  44. typedef struct UpsInfo {
  45.   ULONG ui_Event;
  46.   ULONG ui_Charge; /* Charge in percent */
  47.   ULONG ui_Time;   /* Remaining time    */
  48. } UpsInfo;
  49.  
  50. #endif /* UPS_H */
  51.